package org.rcy.ruicingmarket.config;

import feign.Feign;
import feign.codec.Decoder;
import feign.codec.Encoder;
import org.rcy.ruicingmarket.category.CategoryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 吴康桥
 * @Description
 * @date 2023/3/14 11:45
 */

@Configuration
public class GoodsClientConfiguration {

	@Bean
	public CategoryClient categoryClient(Encoder encoder, Decoder decoder) {
		return Feign.builder().decoder(decoder).
				encoder(encoder).
				target(CategoryClient.class, "http://127.0.0.1:9019/goods");
	}
}
